﻿using dotHTML.HTML;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Text;

namespace TestdotHTML
{
    
    
    /// <summary>
    ///This is a test class for MenuTest and is intended
    ///to contain all MenuTest Unit Tests
    ///</summary>
    [TestClass()]
    public class MenuTest {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext {
            get {
                return testContextInstance;
            }
            set {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Menu Constructor
        ///</summary>
        [TestMethod()]
        public void MenuConstructorTest() {
            Menu target = new Menu();
            Assert.AreEqual("<menu></menu>", target.ToString());
        }

        /// <summary>
        ///A test for Label
        ///</summary>
        [TestMethod()]
        public void LabelTest() {
            Menu target = new Menu();
            string expected = string.Empty;
            string actual;
            target.Label = expected;
            actual = target.Label;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Type
        ///</summary>
        [TestMethod()]
        public void TypeTest() {
            Menu target = new Menu();
            Nullable<Menu.TypeChoices> expected = Menu.TypeChoices.Context;
            Nullable<Menu.TypeChoices> actual;
            target.Type = expected;
            actual = target.Type;
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void ToStringTest() {
            Menu m = new Menu();
            m.Label = "label";
            m.Type = Menu.TypeChoices.Context;
            Assert.AreEqual("<menu label=\"label\" type=\"context\"></menu>", m.ToString());
        }
    }
}
